xmlunit-core : Org.XmlUnit.Builder Namespace

IDifferenceEngineConfigurer<D> Generic Interface

Subset of the configuration options available for a DifferenceEngine.

Syntax

public interface IDifferenceEngineConfigurer<D>
where D : Org.XmlUnit.Builder.IDifferenceEngineConfigurer<D>

Type Parameters

D
Documentation for this section has not yet been entered.

Remarks

since XMLUnit 2.5.1

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

Members

Public Methods

WithAttributeFilter (Predicate<System.Xml.XmlAttribute>) : D
Registers a filter for attributes.
WithComparisonController (Org.XmlUnit.Diff.ComparisonController) : D
Replace the {@link ComparisonControllers#Default} with your own ComparisonController.
WithComparisonFormatter (Org.XmlUnit.Diff.IComparisonFormatter) : D
Sets a non-default formatter for the differences found.
WithComparisonListeners (params Org.XmlUnit.Diff.ComparisonListener[]) : D
Registers listeners that are notified of each comparison.
WithDifferenceEvaluator (Org.XmlUnit.Diff.DifferenceEvaluator) : D
Provide your own custom {@link DifferenceEvaluator} implementation.
WithDifferenceListeners (params Org.XmlUnit.Diff.ComparisonListener[]) : D
Registers listeners that are notified of each comparison with outcome other than ComparisonResult#EQUAL.
WithNamespaceContext (IDictionary<string, string>) : D
Establish a namespace context mapping from URI to prefix that will be used in Comparison.Detail.XPath.
WithNodeFilter (Predicate<System.Xml.XmlNode>) : D
Registers a filter for nodes.
WithNodeMatcher (Org.XmlUnit.Diff.INodeMatcher) : D
Sets the strategy for selecting nodes to compare.

Extension Methods

static
Singleton<T> (this T) : IEnumerable<T>
An enumerable containing a single element.
static
WithPlaceholderSupport<D> (this D) : D
Adds placeholder support to an IDifferenceEngineConfigurer.
static
WithPlaceholderSupportChainedAfter<D> (this D, Org.XmlUnit.Diff.DifferenceEvaluator) : D
Adds placeholder support to an IDifferenceEngineConfigurer considering an additional DifferenceEvaluator.
static
WithPlaceholderSupportUsingDelimiters<D> (this D, string, string) : D
Adds placeholder support to an IDifferenceEngineConfigurer.
static
WithPlaceholderSupportUsingDelimiters<D> (this D, string, string, string, string, string) : D
Adds placeholder support to an IDifferenceEngineConfigurer.
static
WithPlaceholderSupportUsingDelimitersChainedAfter<D> (this D, string, string, Org.XmlUnit.Diff.DifferenceEvaluator) : D
Adds placeholder support to an IDifferenceEngineConfigurer considering an additional DifferenceEvaluator.
static
WithPlaceholderSupportUsingDelimitersChainedAfter<D> (this D, string, string, string, string, string, Org.XmlUnit.Diff.DifferenceEvaluator) : D
Adds placeholder support to an IDifferenceEngineConfigurer considering an additional DifferenceEvaluator.

Member Details

WithAttributeFilter Method

Registers a filter for attributes.

Syntax

public D WithAttributeFilter (Predicate<System.Xml.XmlAttribute> attributeFilter)

Parameters

attributeFilter
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Only attributes for which the predicate returns true are part of the comparison. By default all attributes are considered.

The "special" namespace, namespace-location and schema-instance-type attributes can not be ignored this way. If you want to suppress comparison of them you'll need to implement Org.XmlUnit.Diff.DifferenceEvaluator

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

WithComparisonController Method

Replace the {@link ComparisonControllers#Default} with your own ComparisonController.

Syntax

public D WithComparisonController (Org.XmlUnit.Diff.ComparisonController comparisonController)

Parameters

comparisonController
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

WithComparisonFormatter Method

Sets a non-default formatter for the differences found.

Syntax

public D WithComparisonFormatter (Org.XmlUnit.Diff.IComparisonFormatter formatter)

Parameters

formatter
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

WithComparisonListeners Method

Registers listeners that are notified of each comparison.

Syntax

public D WithComparisonListeners (params Org.XmlUnit.Diff.ComparisonListener[] comparisonListeners)

Parameters

comparisonListeners
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

WithDifferenceEvaluator Method

Provide your own custom {@link DifferenceEvaluator} implementation.

Syntax

public D WithDifferenceEvaluator (Org.XmlUnit.Diff.DifferenceEvaluator differenceEvaluator)

Parameters

differenceEvaluator
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

This overwrites the Default DifferenceEvaluator.

If you want use your custom DifferenceEvaluator in combination with the default or another DifferenceEvaluator you should use DifferenceEvaluators#Chain() or DifferenceEvaluators#First() to combine them:

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

WithDifferenceListeners Method

Registers listeners that are notified of each comparison with outcome other than ComparisonResult#EQUAL.

Syntax

public D WithDifferenceListeners (params Org.XmlUnit.Diff.ComparisonListener[] comparisonListeners)

Parameters

comparisonListeners
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

WithNamespaceContext Method

Establish a namespace context mapping from URI to prefix that will be used in Comparison.Detail.XPath.

Syntax

public D WithNamespaceContext (IDictionary<string, string> prefix2Uri)

Parameters

prefix2Uri
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Without a namespace context (or with an empty context) the XPath expressions will only use local names for elements and attributes.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

WithNodeFilter Method

Registers a filter for nodes.

Syntax

public D WithNodeFilter (Predicate<System.Xml.XmlNode> nodeFilter)

Parameters

nodeFilter
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Only nodes for which the predicate returns true are part of the comparison. By default nodes that are neither document types nor XML declarations are considered.

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240

WithNodeMatcher Method

Sets the strategy for selecting nodes to compare.

Syntax

public D WithNodeMatcher (Org.XmlUnit.Diff.INodeMatcher nodeMatcher)

Parameters

nodeMatcher
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Example with org.xmlunit.diff.DefaultNodeMatcher: .WithNodeMatcher(new DefaultNodeMatcher(ElementSelectors.ByNameAndText))

Requirements

Namespace: Org.XmlUnit.Builder
Assembly: xmlunit-core (in xmlunit-core.dll)
Assembly Versions: 2.9.2.240